package com.mhuang.vo;

import java.io.Serializable;

import lombok.Getter;
import lombok.Setter;

/**
 * 消息头 = [2+2+4+8] 16个字节
 * @Package: com.mhuang.vo
 * @Description 消息头
 * @author huang.miao
 * @date 2017年1月16日 上午10:50:29  
 * @since 1.0.0
 * @group skiper-opensource
 */
public class HeaderStruct implements Serializable{

	private static final long serialVersionUID = 1L;

	@Setter
	@Getter
	private int version;//版本号(2个字节)
	
	@Setter
	@Getter
	private long msgId;//消息id（2个字节）
	
	@Setter
	@Getter
	private long msgLength;//数据长度（只包含数据包的大小、4个字节）

	@Setter
	@Getter
	private long accessId = 12345678;//接入码(8个字节）
	
	public HeaderStruct(){
		
	}
	public HeaderStruct(int msgId,int msgLength){
		this.msgId = msgId;
		this.msgLength = msgLength;
	}
	public HeaderStruct(int msgId,int msgLength,int accessId){
		this.msgId = msgId;
		this.msgLength = msgLength;
		this.accessId = accessId;
	}
}
